package com.bole.controller;


import com.bole.dto.order.TbOrderDto;
import com.bole.dto.order.TbPayLogDto;
import com.bole.pojo.TbOrderDo;
import com.bole.pojo.TbPayLogDo;
import com.bole.service.OrderService;
import com.bole.service.PayLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("paylog")
@Api(value = "支付日志管理api")
public class PayLogController {

    @Autowired
    private PayLogService payLogService;


    @PostMapping("savePayLog")
    @ApiOperation(value = "生成支付日志",notes = "生成支付日志")
    @ApiImplicitParam(name = "payLogDo",value = "日志实体类",required = true,dataTypeClass = TbPayLogDo.class)
    public void savePayLog(@RequestBody TbPayLogDo payLogDo) {
        TbPayLogDo pay = payLogService.savePay(payLogDo);
        TbPayLogDto payLogDto = new TbPayLogDto();
        BeanUtils.copyProperties(pay, payLogDto);
    }

}
